package cn.szsys.integration.controller;

import cn.szsys.integration.util.OkHttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ryan
 * @since 2025-06-18
 **/
@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {
    @RequestMapping("/1")
    public String test() {
        long l = System.currentTimeMillis();
        log.info("请求开始时间戳: {}",l);
        OkHttpUtil.OkhttpResponse sync = OkHttpUtil.builder()
                .url("https://www.baidu.com")
                .post("{}")
                .sync();
        log.info("请求耗时: "+(System.currentTimeMillis() - l)+" ms");
        return "ok";
    }
}
